package com.innovate.nms.domain;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

import com.ivan.toolkit.common.Configs;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
@NoArgsConstructor
public class SmsConfig {
	
	public static Configs.Instance<SmsConfig> instance = 
			new Configs.Instance<SmsConfig>(SmsConfig.class, true);	
	
	
	@XmlAttribute
	@Setter @Getter
	private boolean autoDetect = true;
	
	@XmlAttribute
	@Setter @Getter
	private String port = "";
	
	/**
	 * 0: F2003
	 * 1: JYC331
	 */
	@XmlAttribute
	@Setter @Getter
	private int protocol = 0;
	
	@XmlAttribute
	@Setter @Getter
	private String leader = "@";
	
	@XmlAttribute
	@Setter @Getter
	private int baudrate = 9600;
	
	@XmlAttribute
	@Setter @Getter
	private int parity = 0;
	
	@XmlAttribute
	@Setter @Getter
	private int databits = 8;
	
	@XmlAttribute
	@Setter @Getter
	private int stopbits = 1;
	
	@XmlAttribute
	@Setter @Getter
	private int timeout = 30000;
	
	@XmlAttribute
	@Setter @Getter
	private int waitInterval = 1000;

}
